Bug 526635 - _gdk_window_get_toplevel handles FOREIGN windows
authorCody Russell <bratsche@gnome.org>
Sun, 25 May 2008 23:27:34 +0000 (23:27 +0000)
committerCody Russell <bratsche@src.gnome.org>
Sun, 25 May 2008 23:27:34 +0000 (23:27 +0000)
2008-05-25  Cody Russell  <bratsche@gnome.org>

        Bug 526635 - _gdk_window_get_toplevel handles FOREIGN windows

        * gdk/x11/gdkwindow-x11.c (_gdk_window_get_toplevel): Check
        !WINDOW_IS_TOPLEVEL instead of checking for GDK_WINDOW_CHILD,
        so that we also take into account for foreign windows.
        Report and patch by Nathaniel Smith.

svn path=/trunk/; revision=20166

ChangeLog
gdk/x11/gdkwindow-x11.c

index 2fb4ab3c63afd20db14e7f9c4b1068044f7c89d1..c2aca328be0cf05bc4f7b8670e84be04466d9653 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2008-05-25  Cody Russell  <bratsche@gnome.org>
+
+       Bug 526635 - _gdk_window_get_toplevel handles FOREIGN windows
+
+       * gdk/x11/gdkwindow-x11.c (_gdk_window_get_toplevel): Check
+       !WINDOW_IS_TOPLEVEL instead of checking for GDK_WINDOW_CHILD,
+       so that we also take into account for foreign windows.
+       Report and patch by Nathaniel Smith.
+
 2008-05-25  Cody Russell  <bratsche@gnome.org>
 
        Bug 525461 - Don't invalidate under an input-only child
index d5d7160ca05d4301ee3a689db5e725ea0754625f..56d5e20688850fdbb00e4ef9a2af2caf41912c42 100644 (file)
@@ -153,7 +153,7 @@ _gdk_x11_window_get_toplevel (GdkWindow *window)
   
   g_return_val_if_fail (GDK_IS_WINDOW (window), NULL);
 
-  if (GDK_WINDOW_TYPE (window) == GDK_WINDOW_CHILD)
+  if (!WINDOW_IS_TOPLEVEL (window))
     return NULL;
 
   private = (GdkWindowObject *)window;